package top.tangyh.lamp.care.vo.query;

import cn.hutool.core.util.StrUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Data
@Schema(description = "QueryYxPipeObsvRecorddParam 导管观察记录查询条件")
public class PipeObsvRecorddLatestParam extends BaseQueryParam {

    /**
     * 类型(1、最近一天  2、所有记录)
     */
    @Schema(description = "管道名称")
    private String ppName;

    @Schema(description = "参数名称")
    private String ppTypeName;

    @Schema(description = "病人识别号")
    private String patientIdent;

    public String getSearchPpTypeName() {
        if (StrUtil.isNotEmpty(ppTypeName)) {
            return "%" + ppTypeName + "%";
        }
        return null;
    }

    public String getSearchPpName() {
        if (StrUtil.isNotEmpty(ppName)) {
            return "%" + ppName + "%";
        }
        return null;
    }
}